projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a928c8
)
textview: Fix blinking block cursors
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 13 Mar 2021 00:44:31 +0000
(19:44 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 13 Mar 2021 02:50:07 +0000
(21:50 -0500)
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
gtk/gtktextlayout.c
patch
|
blob
|
history
diff --git
a/gtk/gtktextlayout.c
b/gtk/gtktextlayout.c
index 358a92e51743f1deba269e048084cc9110bbd122..b90e6d12f1e921ff4bacd8018140921e3f489b81 100644
(file)
--- a/
gtk/gtktextlayout.c
+++ b/
gtk/gtktextlayout.c
@@
-4236,6
+4236,13
@@
gtk_text_layout_snapshot (GtkTextLayout *layout,
selection_end_index = -1;
}
+ if (line_display->node != NULL)
+ {
+ if (line_display->has_block_cursor &&
+ gtk_widget_has_focus (widget))
+ g_clear_pointer (&line_display->node, gsk_render_node_unref);
+ }
+
if (line_display->node == NULL)
{
gtk_snapshot_push_collect (snapshot);